<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ClassPropertyAddEdit.ascx.cs" Inherits="IGlobalist.Cms.Admin.Control.ClassPropertyAddEdit" %>
<table>
<tr><td valign="top">

         <asp:GridView ID="gvProperty" runat="server"  AllowPaging="false" AutoGenerateColumns="False"
                CellPadding="6" ForeColor="#333333" OnRowCommand="gvProperty_RowCommand" OnRowDataBound="gvProperty_RowDataBound"  >
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="Name">
                        <ItemTemplate>
                            <asp:Label ID="lblName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'></asp:Label>
                       </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Description">
                        <ItemTemplate>
                           <asp:Label ID="lblDescrption" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Description") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                     <asp:TemplateField HeaderText="Type">
                        <ItemTemplate>
                           <asp:Label ID="lblType" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Type") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Input Type">
                        <ItemTemplate>
                           <asp:Label ID="lblInputType" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.InputType") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Action">                                
                        <ItemTemplate>
                           <asp:ImageButton ID="imgEdit" ImageUrl="~/Admin/Images/edit.gif"  runat="server" CommandName="editProperty" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Name") %>' />
                            <asp:ImageButton ID="ingDelete" ImageUrl="~/Admin/Images/delete.gif" runat="server" OnClientClick="return confirm('Are you sure you want to delete?');"  CommandName="delProperty" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Name") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>                                   
                                                                              
                </Columns>
                
            </asp:GridView>   
                    
   </td></tr>
    
    <tr><td>
    <table>
        <tr><td><asp:Label ID="Label1" runat="server" Text="Name"></asp:Label></td><td><asp:TextBox ID="tbName" runat="server"></asp:TextBox>
            <asp:Label ID="lblError" runat="server" ForeColor="red" Text=""></asp:Label></td></tr>
        <tr><td><asp:Label ID="Label6" runat="server" Text="Display name"></asp:Label></td><td><asp:TextBox ID="tbDisplay" runat="server" ></asp:TextBox></td></tr>
        <tr><td valign="top"><asp:Label ID="Label2" runat="server" Text="Description"></asp:Label></td><td><asp:TextBox ID="tbDescription" runat="server" Rows="4" Height="100px" TextMode="MultiLine" ></asp:TextBox></td></tr>
        <tr><td><asp:Label ID="Label3" runat="server" Text="Type"></asp:Label></td><td> <asp:DropDownList ID="ddlType" runat="server" DataSourceID="XDSType" DataTextField="text" DataValueField="value"></asp:DropDownList><asp:XmlDataSource ID="XDSType" runat="server" DataFile="~/Admin/XML/DataType.xml"
    XPath="//datatype/data"></asp:XmlDataSource></td></tr>
        <tr><td><asp:Label ID="Label4" runat="server" Text="Inut type"></asp:Label></td><td> <asp:DropDownList ID="ddlInputType" runat="server" DataSourceID="XDSInputType" DataTextField="text" DataValueField="value"></asp:DropDownList><asp:XmlDataSource ID="XDSInputType" runat="server" DataFile="~/Admin/XML/InputType.xml"
    XPath="//inputtypes/input"></asp:XmlDataSource></td></tr>
        <tr><td><asp:Label ID="Label5" runat="server" Text="Default value"></asp:Label></td><td><asp:TextBox ID="tbValue" runat="server"></asp:TextBox></td></tr>
        <tr><td align="center" colspan="2"> <asp:Button ID="btnSave" runat="server" Text="Save property" OnClick="btnSave_Click" /> </td></tr>
         

    </table></td></tr> 
 
</table>
